mean(p[8,1,],na.rm=T)
p[9,1,]<-1-pnorm(coef.sim[,coef],mean=rr)
mean(p[9,1,],na.rm=T)
for (k in 1:8){
rr<-coef.sim[,1]*0+ #cwhr$conf_l1
coef.sim[,2]*1+ #cwhr$chga_regime_l1*
coef.sim[,3]*(4730) +  #+0*cwhr$pennwt_rgdpch_l1
coef.sim[,4]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,5]   *7 + # *cwhr$RatYears
coef.sim[,6]*49+ #cwhr$RatYears2*0
coef.sim[,7]*0+ #*cwhr$CompSyst_un_l1
coef.sim[,8]*0 #cwhr$CompSyst_eu_l1*
coef.sim[,44+k]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,52+k]   *7 + # *cwhr$RatYears
coef.sim[,60+k]*49 #cwhr$RatYears2*0
p[1,k+1,]<-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[1,1,],na.rm=T)
p[2,k+1,]<-pnorm(coef.sim[,coef-6],mean=rr)-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[2,1,],na.rm=T)
p[3,k+1,]<-pnorm(coef.sim[,coef-5],mean=rr)-pnorm(coef.sim[,coef-6],mean=rr)
mean(p[3,1,],na.rm=T)
p[4,k+1,]<-pnorm(coef.sim[,coef-4],mean=rr)-pnorm(coef.sim[,coef-5],mean=rr)
mean(p[4,1,],na.rm=T)
p[5,k+1,]<-pnorm(coef.sim[,coef-3],mean=rr)-pnorm(coef.sim[,coef-4],mean=rr)
mean(p[5,1,],na.rm=T)
p[6,k+1,]<-pnorm(coef.sim[,coef-2],mean=rr)-pnorm(coef.sim[,coef-3],mean=rr)
mean(p[6,1,],na.rm=T)
p[7,k+1,]<-pnorm(coef.sim[,coef-1],mean=rr)-pnorm(coef.sim[,coef-2],mean=rr)
mean(p[7,1,],na.rm=T)
p[8,k+1,]<-pnorm(coef.sim[,coef],mean=rr)-pnorm(coef.sim[,coef-1],mean=rr)
mean(p[8,1,],na.rm=T)
p[9,k+1,]<-1-pnorm(coef.sim[,coef],mean=rr)
mean(p[9,1,],na.rm=T)
}
r7<-p
p<-array(NA,dim=c(9,9,1000))
rr<-coef.sim[,1]*0+ #cwhr$conf_l1
coef.sim[,2]*1+ #cwhr$chga_regime_l1*
coef.sim[,3]*(4730) +  #+0*cwhr$pennwt_rgdpch_l1
coef.sim[,4]* +  #(cwhr$Ratification_l1-1)*
coef.sim[,5]   *8 + # *cwhr$RatYears
coef.sim[,6]*64+ #cwhr$RatYears2*0
coef.sim[,7]*0+ #*cwhr$CompSyst_un_l1
coef.sim[,8]*0 #cwhr$CompSyst_eu_l1*
p[1,1,]<-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[1,1,],na.rm=T)
p[2,1,]<-pnorm(coef.sim[,coef-6],mean=rr)-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[2,1,],na.rm=T)
p[3,1,]<-pnorm(coef.sim[,coef-5],mean=rr)-pnorm(coef.sim[,coef-6],mean=rr)
mean(p[3,1,],na.rm=T)
p[4,1,]<-pnorm(coef.sim[,coef-4],mean=rr)-pnorm(coef.sim[,coef-5],mean=rr)
mean(p[4,1,],na.rm=T)
p[5,1,]<-pnorm(coef.sim[,coef-3],mean=rr)-pnorm(coef.sim[,coef-4],mean=rr)
mean(p[5,1,],na.rm=T)
p[6,1,]<-pnorm(coef.sim[,coef-2],mean=rr)-pnorm(coef.sim[,coef-3],mean=rr)
mean(p[6,1,],na.rm=T)
p[7,1,]<-pnorm(coef.sim[,coef-1],mean=rr)-pnorm(coef.sim[,coef-2],mean=rr)
mean(p[7,1,],na.rm=T)
p[8,1,]<-pnorm(coef.sim[,coef],mean=rr)-pnorm(coef.sim[,coef-1],mean=rr)
mean(p[8,1,],na.rm=T)
p[9,1,]<-1-pnorm(coef.sim[,coef],mean=rr)
mean(p[9,1,],na.rm=T)
for (k in 1:8){
rr<-coef.sim[,1]*0+ #cwhr$conf_l1
coef.sim[,2]*1+ #cwhr$chga_regime_l1*
coef.sim[,3]*(4730) +  #+0*cwhr$pennwt_rgdpch_l1
coef.sim[,4]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,5]   *8 + # *cwhr$RatYears
coef.sim[,6]*64+ #cwhr$RatYears2*0
coef.sim[,7]*0+ #*cwhr$CompSyst_un_l1
coef.sim[,8]*0 #cwhr$CompSyst_eu_l1*
coef.sim[,44+k]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,52+k]   *8 + # *cwhr$RatYears
coef.sim[,60+k]*64 #cwhr$RatYears2*0
p[1,k+1,]<-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[1,1,],na.rm=T)
p[2,k+1,]<-pnorm(coef.sim[,coef-6],mean=rr)-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[2,1,],na.rm=T)
p[3,k+1,]<-pnorm(coef.sim[,coef-5],mean=rr)-pnorm(coef.sim[,coef-6],mean=rr)
mean(p[3,1,],na.rm=T)
p[4,k+1,]<-pnorm(coef.sim[,coef-4],mean=rr)-pnorm(coef.sim[,coef-5],mean=rr)
mean(p[4,1,],na.rm=T)
p[5,k+1,]<-pnorm(coef.sim[,coef-3],mean=rr)-pnorm(coef.sim[,coef-4],mean=rr)
mean(p[5,1,],na.rm=T)
p[6,k+1,]<-pnorm(coef.sim[,coef-2],mean=rr)-pnorm(coef.sim[,coef-3],mean=rr)
mean(p[6,1,],na.rm=T)
p[7,k+1,]<-pnorm(coef.sim[,coef-1],mean=rr)-pnorm(coef.sim[,coef-2],mean=rr)
mean(p[7,1,],na.rm=T)
p[8,k+1,]<-pnorm(coef.sim[,coef],mean=rr)-pnorm(coef.sim[,coef-1],mean=rr)
mean(p[8,1,],na.rm=T)
p[9,k+1,]<-1-pnorm(coef.sim[,coef],mean=rr)
mean(p[9,1,],na.rm=T)
}
r8<-p
p<-array(NA,dim=c(9,9,1000))
rr<-coef.sim[,1]*0+ #cwhr$conf_l1
coef.sim[,2]*1+ #cwhr$chga_regime_l1*
coef.sim[,3]*(4730) +  #+0*cwhr$pennwt_rgdpch_l1
coef.sim[,4]* +  #(cwhr$Ratification_l1-1)*
coef.sim[,5]   *9 + # *cwhr$RatYears
coef.sim[,6]*81+ #cwhr$RatYears2*0
coef.sim[,7]*0+ #*cwhr$CompSyst_un_l1
coef.sim[,8]*0 #cwhr$CompSyst_eu_l1*
p[1,1,]<-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[1,1,],na.rm=T)
p[2,1,]<-pnorm(coef.sim[,coef-6],mean=rr)-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[2,1,],na.rm=T)
p[3,1,]<-pnorm(coef.sim[,coef-5],mean=rr)-pnorm(coef.sim[,coef-6],mean=rr)
mean(p[3,1,],na.rm=T)
p[4,1,]<-pnorm(coef.sim[,coef-4],mean=rr)-pnorm(coef.sim[,coef-5],mean=rr)
mean(p[4,1,],na.rm=T)
p[5,1,]<-pnorm(coef.sim[,coef-3],mean=rr)-pnorm(coef.sim[,coef-4],mean=rr)
mean(p[5,1,],na.rm=T)
p[6,1,]<-pnorm(coef.sim[,coef-2],mean=rr)-pnorm(coef.sim[,coef-3],mean=rr)
mean(p[6,1,],na.rm=T)
p[7,1,]<-pnorm(coef.sim[,coef-1],mean=rr)-pnorm(coef.sim[,coef-2],mean=rr)
mean(p[7,1,],na.rm=T)
p[8,1,]<-pnorm(coef.sim[,coef],mean=rr)-pnorm(coef.sim[,coef-1],mean=rr)
mean(p[8,1,],na.rm=T)
p[9,1,]<-1-pnorm(coef.sim[,coef],mean=rr)
mean(p[9,1,],na.rm=T)
for (k in 1:8){
rr<-coef.sim[,1]*0+ #cwhr$conf_l1
coef.sim[,2]*1+ #cwhr$chga_regime_l1*
coef.sim[,3]*(4730) +  #+0*cwhr$pennwt_rgdpch_l1
coef.sim[,4]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,5]   *9 + # *cwhr$RatYears
coef.sim[,6]*81+ #cwhr$RatYears2*0
coef.sim[,7]*0+ #*cwhr$CompSyst_un_l1
coef.sim[,8]*0 #cwhr$CompSyst_eu_l1*
coef.sim[,44+k]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,52+k]   *9 + # *cwhr$RatYears
coef.sim[,60+k]*81 #cwhr$RatYears2*0
p[1,k+1,]<-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[1,1,],na.rm=T)
p[2,k+1,]<-pnorm(coef.sim[,coef-6],mean=rr)-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[2,1,],na.rm=T)
p[3,k+1,]<-pnorm(coef.sim[,coef-5],mean=rr)-pnorm(coef.sim[,coef-6],mean=rr)
mean(p[3,1,],na.rm=T)
p[4,k+1,]<-pnorm(coef.sim[,coef-4],mean=rr)-pnorm(coef.sim[,coef-5],mean=rr)
mean(p[4,1,],na.rm=T)
p[5,k+1,]<-pnorm(coef.sim[,coef-3],mean=rr)-pnorm(coef.sim[,coef-4],mean=rr)
mean(p[5,1,],na.rm=T)
p[6,k+1,]<-pnorm(coef.sim[,coef-2],mean=rr)-pnorm(coef.sim[,coef-3],mean=rr)
mean(p[6,1,],na.rm=T)
p[7,k+1,]<-pnorm(coef.sim[,coef-1],mean=rr)-pnorm(coef.sim[,coef-2],mean=rr)
mean(p[7,1,],na.rm=T)
p[8,k+1,]<-pnorm(coef.sim[,coef],mean=rr)-pnorm(coef.sim[,coef-1],mean=rr)
mean(p[8,1,],na.rm=T)
p[9,k+1,]<-1-pnorm(coef.sim[,coef],mean=rr)
mean(p[9,1,],na.rm=T)
}
r9<-p
p<-array(NA,dim=c(9,9,1000))
rr<-coef.sim[,1]*0+ #cwhr$conf_l1
coef.sim[,2]*1+ #cwhr$chga_regime_l1*
coef.sim[,3]*(4730) +  #+0*cwhr$pennwt_rgdpch_l1
coef.sim[,4]* +  #(cwhr$Ratification_l1-1)*
coef.sim[,5]   *10 + # *cwhr$RatYears
coef.sim[,6]*100+ #cwhr$RatYears2*0
coef.sim[,7]*0+ #*cwhr$CompSyst_un_l1
coef.sim[,8]*0 #cwhr$CompSyst_eu_l1*
p[1,1,]<-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[1,1,],na.rm=T)
p[2,1,]<-pnorm(coef.sim[,coef-6],mean=rr)-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[2,1,],na.rm=T)
p[3,1,]<-pnorm(coef.sim[,coef-5],mean=rr)-pnorm(coef.sim[,coef-6],mean=rr)
mean(p[3,1,],na.rm=T)
p[4,1,]<-pnorm(coef.sim[,coef-4],mean=rr)-pnorm(coef.sim[,coef-5],mean=rr)
mean(p[4,1,],na.rm=T)
p[5,1,]<-pnorm(coef.sim[,coef-3],mean=rr)-pnorm(coef.sim[,coef-4],mean=rr)
mean(p[5,1,],na.rm=T)
p[6,1,]<-pnorm(coef.sim[,coef-2],mean=rr)-pnorm(coef.sim[,coef-3],mean=rr)
mean(p[6,1,],na.rm=T)
p[7,1,]<-pnorm(coef.sim[,coef-1],mean=rr)-pnorm(coef.sim[,coef-2],mean=rr)
mean(p[7,1,],na.rm=T)
p[8,1,]<-pnorm(coef.sim[,coef],mean=rr)-pnorm(coef.sim[,coef-1],mean=rr)
mean(p[8,1,],na.rm=T)
p[9,1,]<-1-pnorm(coef.sim[,coef],mean=rr)
mean(p[9,1,],na.rm=T)
for (k in 1:8){
rr<-coef.sim[,1]*0+ #cwhr$conf_l1
coef.sim[,2]*1+ #cwhr$chga_regime_l1*
coef.sim[,3]*(4730) +  #+0*cwhr$pennwt_rgdpch_l1
coef.sim[,4]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,5]   *10 + # *cwhr$RatYears
coef.sim[,6]*100+ #cwhr$RatYears2*0
coef.sim[,7]*0+ #*cwhr$CompSyst_un_l1
coef.sim[,8]*0 #cwhr$CompSyst_eu_l1*
coef.sim[,44+k]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,52+k]   *10 + # *cwhr$RatYears
coef.sim[,60+k]*100 #cwhr$RatYears2*0
p[1,k+1,]<-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[1,1,],na.rm=T)
p[2,k+1,]<-pnorm(coef.sim[,coef-6],mean=rr)-pnorm(coef.sim[,coef-7],mean=rr)
mean(p[2,1,],na.rm=T)
p[3,k+1,]<-pnorm(coef.sim[,coef-5],mean=rr)-pnorm(coef.sim[,coef-6],mean=rr)
mean(p[3,1,],na.rm=T)
p[4,k+1,]<-pnorm(coef.sim[,coef-4],mean=rr)-pnorm(coef.sim[,coef-5],mean=rr)
mean(p[4,1,],na.rm=T)
p[5,k+1,]<-pnorm(coef.sim[,coef-3],mean=rr)-pnorm(coef.sim[,coef-4],mean=rr)
mean(p[5,1,],na.rm=T)
p[6,k+1,]<-pnorm(coef.sim[,coef-2],mean=rr)-pnorm(coef.sim[,coef-3],mean=rr)
mean(p[6,1,],na.rm=T)
p[7,k+1,]<-pnorm(coef.sim[,coef-1],mean=rr)-pnorm(coef.sim[,coef-2],mean=rr)
mean(p[7,1,],na.rm=T)
p[8,k+1,]<-pnorm(coef.sim[,coef],mean=rr)-pnorm(coef.sim[,coef-1],mean=rr)
mean(p[8,1,],na.rm=T)
p[9,k+1,]<-1-pnorm(coef.sim[,coef],mean=rr)
mean(p[9,1,],na.rm=T)
}
r10<-p
rr<-coef.sim[,1]*0+ #cwhr$conf_l1
coef.sim[,2]*0+ #cwhr$chga_regime_l1*
coef.sim[,3]*(4730) +  #+0*cwhr$pennwt_rgdpch_l1
coef.sim[,4]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,5]   *2 + # *cwhr$RatYears
coef.sim[,6]*4+ #cwhr$RatYears2*0
coef.sim[,7]*0+ #*cwhr$CompSyst_un_l1
coef.sim[,8]*0 #cwhr$CompSyst_eu_l1*
coef.sim[,45]* 1+  #(cwhr$Ratification_l1-1)*
coef.sim[,53]   *2 + # *cwhr$RatYears
coef.sim[,61]*4 #cwhr$RatYears2*0
p<-array(NA,dim=c(9,9,1000))
# calculates averages and credible intervals
res<-array(NA,dim=c(9,9))
res5<-array(NA,dim=c(9,9))
res95<-array(NA,dim=c(9,9))
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]-bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res01<-res
res015<-res5
res0195<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-(r1[,,i]%*%r2[,,i])-(bas[,,i]%*%bas[,,i])
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res02<-res
res025<-res5
res0295<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]%*%r2[,,i]%*%r3[,,i]-bas[,,i]%*%bas[,,i]%*%bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res03<-res
res035<-res5
res0395<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]%*%r2[,,i]%*%r3[,,i]%*%r4[,,i]-bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res04<-res
res045<-res5
res0495<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]%*%r2[,,i]%*%r3[,,i]%*%r4[,,i]%*%r5[,,i]-bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res05<-res
res055<-res5
res0595<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]%*%r2[,,i]%*%r3[,,i]%*%r4[,,i]%*%r5[,,i]%*%r6[,,i]-bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res06<-res
res065<-res5
res0695<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]%*%r2[,,i]%*%r3[,,i]%*%r4[,,i]%*%r5[,,i]%*%r6[,,i]%*%r7[,,i]-bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res07<-res
res075<-res5
res0795<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]%*%r2[,,i]%*%r3[,,i]%*%r4[,,i]%*%r5[,,i]%*%r6[,,i]%*%r7[,,i]%*%r8[,,i]-bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res08<-res
res085<-res5
res0895<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]%*%r2[,,i]%*%r3[,,i]%*%r4[,,i]%*%r5[,,i]%*%r6[,,i]%*%r7[,,i]%*%r8[,,i]%*%r9[,,i]-bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res09<-res
res095<-res5
res0995<-res95
qq<-p
for (i in 1:1000){
qq[,,i]<-r1[,,i]%*%r2[,,i]%*%r3[,,i]%*%r4[,,i]%*%r5[,,i]%*%r6[,,i]%*%r7[,,i]%*%r8[,,i]%*%r9[,,i]%*%r9[,,i]-bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]%*%bas[,,i]
}
for (i in 1:9){
for (j in 1:9){
res[i,j]<-mean(qq[i,j,],na.rm=T)
res5[i,j]<-quantile(qq[i,j,],probs=seq(0.05,0.05),na.rm=T)
res95[i,j]<-quantile(qq[i,j,],probs=seq(0.95,0.95),na.rm=T)
}}
res10<-res
res105<-res5
res1095<-res95
#pdf("C:\\Users\\Daniel\\Dropbox\\Journal (II)\\Replication Files\\Hug (Complying with Human Rights)\\cwhr\\cwhrf4n_dh.pdf")
postscript("C:\\Users\\Daniel\\Dropbox\\Journal (II)\\Replication Files\\Hug (Complying with Human Rights)\\cwhr\\figure5_dh.eps")
par(mfrow=c(3,4))
par(ps=9)
#par(mfrow=c(1,1))
resp<-rbind(t(res01[,1]),t(res02[,1]),t(res03[,1]),t(res04[,1]),t(res05[,1]),t(res06[,1]),t(res07[,1]),
t(res08[,1]),t(res09[,1]),t(res10[,1]))
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 0",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
resp<-rbind(t(res01[,2]),t(res02[,2]),t(res03[,2]),t(res04[,2]),t(res05[,2])
,t(res06[,2]),t(res07[,2]),t(res08[,2]),t(res09[,2]),t(res10[,2]))
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 1",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
resp<-rbind(t(res01[,3]),t(res02[,3]),t(res03[,3]),t(res04[,3]),t(res05[,3])
,t(res06[,3]),t(res07[,3]),t(res08[,3]),t(res09[,3]),t(res10[,3]))
)
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 2",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
resp<-rbind(t(res01[,4]),t(res02[,4]),t(res03[,4]),t(res04[,4]),t(res05[,4])
,t(res06[,4]),t(res07[,4]),t(res08[,4]),t(res09[,4]),t(res10[,4]))
)
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 3",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
resp<-rbind(t(res01[,5]),t(res02[,5]),t(res03[,5]),t(res04[,5]),t(res05[,5])
,t(res06[,5]),t(res07[,5]),t(res08[,5]),t(res09[,5]),t(res10[,5]))
)
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 4",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
resp<-rbind(t(res01[,6]),t(res02[,6]),t(res03[,6]),t(res04[,6]),t(res05[,6])
,t(res06[,6]),t(res07[,6]),t(res08[,6]),t(res09[,6]),t(res10[,6]))
)
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 5",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
resp<-rbind(t(res01[,7]),t(res02[,7]),t(res03[,7]),t(res04[,7]),t(res05[,7])
,t(res06[,7]),t(res07[,7]),t(res08[,7]),t(res09[,7]),t(res10[,7]))
)
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 6",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
resp<-rbind(t(res01[,8]),t(res02[,8]),t(res03[,8]),t(res04[,8]),t(res05[,8])
,t(res06[,8]),t(res07[,8]),t(res08[,8]),t(res09[,8]),t(res10[,8]))
)
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 7",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
resp<-rbind(t(res01[,9]),t(res02[,9]),t(res03[,9]),t(res04[,9]),t(res05[,9])
,t(res06[,9]),t(res07[,9]),t(res08[,9]),t(res09[,9]),t(res10[,9]))
)
xx<-seq(1:nrow(resp))
plot(xx,resp[,1],type="l",ylim=c(0,0),lty=1, main="phys. int. 8",
xlab="years since ratification",ylab="change in p due to ratific.")
lines(xx,resp[,2],add=T,lty=2)
lines(xx,resp[,3],add=T,lty=3)
lines(xx,resp[,4],add=T,lty=4)
lines(xx,resp[,5],add=T,lty=5)
lines(xx,resp[,6],add=T,lty=6)
lines(xx,resp[,7],add=T,lty=7)
lines(xx,resp[,8],add=T,lty=8)
lines(xx,resp[,9],add=T,lty=9)
plot(0,0,ylim=c(-2.,0.5),xaxt="n",yaxt="n",main="legend",
xlab="", ylab="",lty=1,type="l")
legend("bottomleft", c("phy.int.0", "phy.int.1", "phy.int.2", "phy.int.3"
, "phy.int.4", "phy.int.5", "phy.int.6", "phy.int.7", "phy.int.8"),
lty = c(1, 2, 3,4,5,6,7,8,9)   ,    merge = TRUE, y.intersp=0.75,bty="n")
dev.off()
### produces Figure 5
xxx<-seq(1:11)
#pdf("C:\\Users\\Daniel\\Dropbox\\Journal (II)\\Replication Files\\Hug (Complying with Human Rights)\\cwhr\\cwhrf3n_dh.pdf")
postscript("C:\\Users\\Daniel\\Dropbox\\Journal (II)\\Replication Files\\Hug (Complying with Human Rights)\\cwhr\\newest_5_dh.eps")
par(mfrow=c(1,1))
plot(xxx,-0.788+0.215*xxx-0.010*xxx*xxx,type="l",ylim=c(-2.,0.5),
xlab="years since ratification", ylab="marginal effect on latent variable",lty=1)
lines(xxx,-0.788+0.892+(0.215-0.222)*xxx+(0.011-0.01)*xxx*xxx,type="l",add=T,lty=2)
lines(xxx,-0.788+0.305+(0.215-0.206)*xxx+(0.009-0.01)*xxx*xxx,type="l",add=T,lty=3)
lines(xxx,-0.788+0.194+(0.215-0.141)*xxx+(0.006-0.01)*xxx*xxx,type="l",add=T,lty=4)
lines(xxx,-0.788+0.809+(0.215-0.241)*xxx+(0.010-0.01)*xxx*xxx,type="l",add=T,lty=5)
lines(xxx,-0.788+1.243+(0.215-0.323)*xxx+(0.014-0.01)*xxx*xxx,type="l",add=T,lty=6)
lines(xxx,-0.788+1.350+(0.215-0.278)*xxx+(0.011-0.01)*xxx*xxx,type="l",add=T,lty=7)
lines(xxx,-0.788+0.522+(0.215-0.162)*xxx+(0.007-0.01)*xxx*xxx,type="l",add=T,lty=8)
lines(xxx,-0.788+0.871+(0.215-0.272)*xxx+(0.011-0.01)*xxx*xxx,type="l",add=T,lty=9)
legend("bottomleft", c("phy.int.0", "phy.int.1", "phy.int.2", "phy.int.3"
, "phy.int.4", "phy.int.5", "phy.int.6", "phy.int.7", "phy.int.8"),
lty = c(1, 2, 3,4,5,6,7,8,9)   ,    merge = TRUE)
dev.off()
